These slides are inspired by:
"Creating effective figures and tables" by Karl Broman. Code available on GitHub repository. Introduction to Data Visualization course by Peter Aldhous
It is a chapter in a data visualization chapter in this book
17-3-7
These slides are inspired by:
"Creating effective figures and tables" by Karl Broman. Code available on GitHub repository. Introduction to Data Visualization course by Peter Aldhous
It is a chapter in a data visualization chapter in this book
Here we are representing quantities with both areas and angles since both the angle and area of each pie slice is proportional to the quantity it represents.
This turns out to be a sub optimal choice since, as demonstrated by perception studies, humans are not good at precisely quantifying angles and are even worse when only are is available.
Pie chart of browser usage.
Position and length are the preferred ways to display quantities over angles which are preferred to area.
Brightness and color are even harder to quantifying that angles and area but, as we will see later, they are sometimes useful when more than two dimensions are being displayed.
When using length (e.g. barplots) it is misleading not to start the bars at 0.
This is because, by using a barplot, we are implying the length is proportional to the quantities being displayed.
By avoiding 0, relatively small difference can be made to look much bigger than they actually are.
This approach is often used by politicians or media organizations trying to exaggerate a difference.
When using position rather than length, it is not necessary to include 0.
This is particularly the case when we want to compare differences between groups relative the variability seen within the groups.
(Source: President Barack Obama’s 2011 State of the Union Address via [Peter Aldhous] (http://paldhous.github.io/ucb/2016/dataviz/index.html))
library(RColorBrewer) display.brewer.all(type="div")
(Source: Karl Broman)

| state | year | Measles | Pertussis | Polio |
|---|---|---|---|---|
| California | 1940 | 37.8826320 | 18.3397861 | 18.3397861 |
| California | 1950 | 13.9124205 | 4.7467350 | 4.7467350 |
| California | 1960 | 14.1386471 | 0.0000000 | 0.0000000 |
| California | 1970 | 0.9767889 | 0.0000000 | 0.0000000 |
| California | 1980 | 0.3743467 | 0.0515466 | 0.0515466 |
| state | year | Measles | Pertussis | Polio |
|---|---|---|---|---|
| California | 1940 | 37.9 | 18.3 | 18.3 |
| California | 1950 | 13.9 | 4.7 | 4.7 |
| California | 1960 | 14.1 | 0.0 | 0.0 |
| California | 1970 | 1.0 | 0.0 | 0.0 |
| California | 1980 | 0.4 | 0.1 | 0.1 |
| state | year | Measles | Pertussis | Polio |
|---|---|---|---|---|
| California | 1940 | 37.9 | 18.3 | 18.3 |
| California | 1950 | 13.9 | 4.7 | 4.7 |
| California | 1960 | 14.1 | 0.0 | 0.0 |
| California | 1970 | 1.0 | 0.0 | 0.0 |
| California | 1980 | 0.4 | 0.1 | 0.1 |
| state | disease | 1940 | 1950 | 1960 | 1970 | 1980 |
|---|---|---|---|---|---|---|
| California | Measles | 37.9 | 13.9 | 14.1 | 1 | 0.4 |
| California | Pertussis | 18.3 | 4.7 | 0.0 | 0 | 0.1 |
| California | Polio | 18.3 | 4.7 | 0.0 | 0 | 0.1 |